package com.haojiu.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author:我叫浩九
 * @date：2021/8/30 11:25
 * create in RuGao JiangSu
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LendList {
    private int lendId;
    private String bookName;
    private String userName;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//接收页面输入的时间，将其格式化
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")//后端传的日期格式化
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lendDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date backDate;
    private String status;
}
